From b1250935a0bf0c26b0b91a9acd95717c1dbd674b Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 23 Oct 2017 15:34:17 +0200 Subject: [PATCH] GtkIconHelper: Remove unused code --- gtk/gtkiconhelper.c | 50 --------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index e4383f64b7..5918f28d0f 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -234,56 +234,6 @@ ensure_surface_from_surface (GtkIconHelper *self, return cairo_surface_reference (orig_surface); } -static gboolean -get_pixbuf_size (GtkIconHelper *self, - gint scale, - GdkPixbuf *orig_pixbuf, - gint orig_scale, - gint *width_out, - gint *height_out, - gint *scale_out) -{ - gboolean scale_pixmap; - gint width, height; - - scale_pixmap = FALSE; - - if (self->force_scale_pixbuf && - (self->pixel_size != -1 || - self->icon_size != GTK_ICON_SIZE_INVALID)) - { - ensure_icon_size (self, &width, &height); - - if (scale != orig_scale || - width < gdk_pixbuf_get_width (orig_pixbuf) / orig_scale || - height < gdk_pixbuf_get_height (orig_pixbuf) / orig_scale) - { - width = MIN (width * scale, gdk_pixbuf_get_width (orig_pixbuf) * scale / orig_scale); - height = MIN (height * scale, gdk_pixbuf_get_height (orig_pixbuf) * scale / orig_scale); - - scale_pixmap = TRUE; - } - else - { - width = gdk_pixbuf_get_width (orig_pixbuf); - height = gdk_pixbuf_get_height (orig_pixbuf); - scale = orig_scale; - } - } - else - { - width = gdk_pixbuf_get_width (orig_pixbuf); - height = gdk_pixbuf_get_height (orig_pixbuf); - scale = orig_scale; - } - - *width_out = width; - *height_out = height; - *scale_out = scale; - - return scale_pixmap; -} - static cairo_surface_t * ensure_surface_for_gicon (GtkIconHelper *self, GtkCssStyle *style, -- 2.30.2